<template>
  <div>
    <el-table
      :data="tableData"
      style="width: 100%;margin-bottom: 20px;"
      row-key="id"
      border
      :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
    >
      <el-table-column
        prop="id"
        label="id"
      />
      <el-table-column
        prop="authName"
        label="权限名称"
      />
      <el-table-column
        prop="path"
        label="路径"
      />
    </el-table>
  </div>
</template>

<script>
import { getRights } from '@/api/rights'

export default {
  name: 'PERMISSIONLIST',
  data() {
    return {
      tableData: [],
      role: {}
    }
  },
  created() {
    this.getRights()
  },
  methods: {
    async getRights() {
      this.tableData = await getRights()
    }
  }
}
</script>
